package com.example.environment.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.environment.pojo.Province;
import com.example.environment.pojo.mapper.ProvinceMapper;
import com.example.environment.service.ProvinceService;
import com.example.environment.tools.common.ResultMsg;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProvinceServiceImpl extends ServiceImpl<ProvinceMapper, Province> implements ProvinceService {
    @Override
    public ResultMsg getAllProvince() {
        List<Province> provinceList=list();
        if(provinceList==null){
            return ResultMsg.failOp("查询省列表为空");
        }
        return ResultMsg.successOp(provinceList);
    }
}
